﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using DTO;
using DAO;

namespace BUS
{
    public class KhachHangBUS
    {
        public static DataTable GetAll()
        {
            return KhachHangDAO.GetAll();
        }
        public static DataTable GetTheoMa(int ma)
        {
            return KhachHangDAO.GetTheoMa(ma);
        }
        public static DataTable KhachTheoMa(int ma)
        {
            return KhachHangDAO.KhachTheoMa(ma);
        }
        public static DataTable MaKhachTheoTen(string ten)
        {
            return KhachHangDAO.MaKhachTheoTen(ten);
        }
        public void ThemKhach(KhachHangDTO kh)
        {
            KhachHangDAO dao = new KhachHangDAO();
            dao.ThemKhach(kh);
        }
        public void CapNhatKhach(KhachHangDTO kh)
        {
            KhachHangDAO dao = new KhachHangDAO();
            dao.CapNhatKhach(kh);
        }
        public void XoaKhach(int makhach)
        {
            KhachHangDAO dao = new KhachHangDAO();
            dao.XoaKhach(makhach);
        }
        public static DataTable TimKhachHang(string tenkh)
        {
            return KhachHangDAO.TimKhachHang(tenkh);
        }
        public static DataTable LayThongTinKhachHangTheoMa(int makh)
        {
            return KhachHangDAO.LayThongTinKhachHangTheoMa(makh);
        }
    }
}
